package com.secondhand.controller;

import com.secondhand.domain.good;
import com.secondhand.domain.user_good;
import com.secondhand.service.Impl.goodServiceImpl;
import com.secondhand.service.Impl.user_goodServiceImpl;
import com.secondhand.utils.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("二手交易相关接口")
@Log4j2
@RestController
@RequestMapping("/user/good")
public class userGoodController {
    @Autowired
    user_goodServiceImpl userGoodService;

    @ApiOperation("用户商品")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody user_good userGood) {
        boolean result = userGoodService.add(userGood);
        return AjaxResult.success("添加用户商品成功",result);
    }
}
